package org.hhgzs.modules.erp.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 财务主表
 * </p>
 *
 * @author peiqy
 * @since 2021-07-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("hx_account_head")
public class AccountHead extends Model<AccountHead> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 类型(支出/收入/收款/付款/转账)
     */
    private String type;

    /**
     * 单位Id(收款/付款单位)
     */
    private Long organId;

    /**
     * 经手人id
     */
    private Long handsPersonId;

    /**
     * 操作员
     */
    private Long creator;

    /**
     * 变动金额(优惠/收款/付款/实付)
     */
    private BigDecimal changeAmount;

    /**
     * 优惠金额
     */
    private BigDecimal discountMoney;

    /**
     * 合计金额
     */
    private BigDecimal totalPrice;

    /**
     * 账户(收款/付款)
     */
    private Long accountId;

    /**
     * 单据编号
     */
    private String billNo;

    /**
     * 单据日期
     */
    private LocalDateTime billTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 附件名称
     */
    private String fileName;

    /**
     * 租户id
     */
    private Long tenantId;

    /**
     * 删除标记，0未删除，1删除
     */
    private String deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
